<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">		
	function submitDo(){
	var list;	
	list=confirm("상품을 등록합니다!!");
		if(list==true){
			document.write.submit();
		}else{
			alert("취소 되었습니다.");
		}
	}	
</script>
</head>
<body>
	<div align=center><h1>상품 등록</h1></div>
	
<form action="modify.do" method="post" enctype="multipart/form-data" name="write">
<table width="1000" border="1">
	<tr height="30">
		<td>상품명: <input type="text" name="p_name" value="${proCommand.p_name}"></td>
		<td>상품코드: <input type="text" name="p_code" value="${proCommand.p_code}"></td>
		<td>상품 카테고리 : <select name="p_category">
							<option value="공구끼리">공구 끼리</option>
							<option value="마켓끼리">마켓 끼리</option>
					</select> 
		</td>
		<td>가격: <input type="text" name="p_price" value="${proCommand.p_price}"></td>
	</tr>
	<tr height="30">
		<td colspan="3">상품 옵션1 : <input type="text" name="p_option" value="${proCommand.p_option}"></td>
		<td><select name="p_valid">
			<option value="on">판 매</option>
			<option value="wait">판매 대기</option>
		</select></td>	
		
	</tr>
	<tr height="30">
		<td width="50%">마일리지 : <input type="text" name="p_point" value="${proCommand.p_point}"></td>
		<td>옵션 마일리지 : <input type="text" name="p_addpoint" value="${proCommand.p_addpoint}"> <font color=red>(없을 땐 0)</font></td>
		<td width="50%"> 시간 선택 : <input type="text" name="p_time" value="${proCommand.p_time}"></td>
		<td>수량 : <input type="text" name="p_amount" value="${proCommand.p_amount}"></td>
	</tr>
	<tr>
		<td align="center">내용</td><td colspan="3"><textarea cols="100" rows="20" name="p_content">${proCommand.p_content}</textarea></td>
	</tr>
	<tr height="30">
		<td>상품 목록 사진 : <input type="file" name="reportFile" value="${proCommand.p_listimage}">
							<br>	</td>
		<td>상품 미리보기 사진 :   <input type="file" name="reportFile"><br>
								${proCommand.p_previewimage1}
								<input type="file" name="reportFile" ><font color=red>(null 가능)</font><br>
								${proCommand.p_previewimage2}
								<input type="file" name="reportFile"><font color=red>(null 가능)</font>
								${proCommand.p_previewimage3}
		</td>
		<td colspan="2">상품 상세 사진 : <br><input type="file" name="reportFile"><br>
										${proCommand.p_productimage1}
									  <input type="file" name="reportFile" ><font color=red>(null 가능)</font><br>
									  ${proCommand.p_productimage2}
									  <input type="file" name="reportFile"><font color=red>(null 가능)</font>
									  ${proCommand.p_productimage3}
									  </td>
	</tr>
	<tr height="30">
		<td align="right" colspan="4">
		<input type="button" value="등록" onclick="submitDo()">
		<input type="reset" value="reset">
		<input type="button" value="목록" onclick="location.href='prolist.do'"></td>
	</tr> 
</table><br><br><br>
</form>
</body>
</html>